package org.csu.bbs.persistence;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.csu.bbs.entity.Posts;

import java.util.List;

@Mapper
public interface PostsMapper extends BaseMapper<Posts> {

    @Select("select * from posts where sectionid = #{id}")
    List<Posts> selectBySection(Integer id);
    @Select("select * from posts where id in( select postid from collection where userid=#{userid} )")
    List<Posts> selectCollection(String userid);
}
